/******************************************************************************
 * FileName:    gwin_spec_notify.c
 * Desc:        上报接口
 *
 *
 * Author:      Lin
 * Notes:
 *
 ******************************************************************************/

/*-------------------------- Includes ---------------------------------------*/
#include "S_2_Curtain_doChange.h"
#include "S_3_Function_doChange.h"
#include "S_3_Function_doEvent.h"
#include "on_property_request.h"
#include "gwin_global_data.h"


/*-------------------------- Macro Definitions ------------------------------*/
#define LOCAL_DEBUG_EN                      ( 0 )
#if LOCAL_DEBUG_EN
#define GWIN_DEBUG(...)                     USER_DEBUG(__VA_ARGS__)
#else
#define GWIN_DEBUG(...)
#endif


/*-------------------------- Type Declarations ------------------------------*/

/*-------------------------- Global Variables -------------------------------*/

/*-------------------------- Local Variables --------------------------------*/

/*-------------------------- Functions Declarations -------------------------*/

/*-------------------------- Functions Definitions --------------------------*/
uint8_t spec_notify_current_position(uint32_t value)
{
    GWIN_DEBUG("%d", value);
    return P_2_2_CurrentPosition_doChange(value);
}

uint8_t spec_notify_target_position(uint32_t value)
{
    GWIN_DEBUG("%d", value);
    return P_2_3_TargetPosition_doChange(value);
}

uint8_t spec_notify_direction(uint32_t value)
{
    GWIN_DEBUG("%d", value);
    return P_2_4_MotorReverse_doChange(value);
}

uint8_t spec_notify_speed_level(uint32_t value)
{
    GWIN_DEBUG("%d", value);
    return P_2_3_TargetPosition_doChange(value);
}

uint8_t spec_notify_stroke_min(uint32_t value)
{
    GWIN_DEBUG("%d", value);
    return P_3_2_StrokeSetting_doChange(value);
}

uint8_t spec_notify_stroke_max(uint32_t value)
{
    GWIN_DEBUG("%d", value);
    return P_3_3_StrokeSettingMax_doChange(value);
}

uint8_t spec_notify_node_mode(uint32_t value)
{
    GWIN_DEBUG("%d", value);
    return P_3_4_NodeModel_doChange(value);
}

uint8_t spec_notify_product_cfg(uint32_t value)
{
    GWIN_DEBUG("%d", value);
    return P_3_6_Configuration_doChange(value);
}


void spec_notify_success_do_event(uint32_t value)
{
    GWIN_DEBUG("");
    E_3_2_Success_doEvent(value);
}

void spec_notify_log_event(uint32_t value)
{
    GWIN_DEBUG("");
    E_3_1_Feature_doEvent(value);
}

/*-------------------------- END OF FILE ------------------------------------*/

